package com.itbaizhan.shopping_common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 返回状态码枚举类
 */
@Getter
@AllArgsConstructor
public enum CodeEnum {
	// 正常
	SUCCESS(200, "OK"),
	//系统异常
	SYSTEM_ERROR(500, "这里是系统异常"),
	//业务异常
	PARAMETER_ERROR(601, "参数异常"),
	INSERT_PRODUCT_TYPE_ERROR(602, "三级商品类型不能添加子类型"),//添加商品类型失败异常
	DELETE_PRODUCT_TYPE_ERROR(603, "该商品类型不能直接删除"),
	UPLOAD_FILE_ERROR(604, "上传文件失败"),
	REGISTER_CODE_ERROR(605, "验证码错误"),//验证码错误
	REGISTER_REPEAT_PHONE_ERROR(606, "手机号重复"),
	REGISTER_REPEAT_NAME_ERROR(607, "用户名重复"),
	USERNAME_PASSWORD_ERROR(608, "用户名或密码错误"),
	LOGIN_CODE_ERROR(609, "验证码错误"),
	PHONE_NOT_REGISTER(610, "手机号未注册"),
	PHONE_STATUS_ERROR(611, "手机号状态异常"),
	QR_CODE_ERROR(612, "二维码失效"),
	ORDER_STATUS_ERROR(613, "订单状态异常"),
	NO_STOCK_ERROR(614, "库存不足"),
	CHECK_SIGN_ERROR(615, "签名错误"),
	ORDER_EXPIRED_ERROR(616, "订单不存在或已超时"),
	SECKILL_GOODS_NOT_EXIST(617, "秒杀商品不存在");
	
	private final Integer code;
	private final String message;
}
